#include "stm32f4xx_hal.h"
#define ADDR 0x70
#define SCL_PIN   GPIO_PIN_14
#define SDA_PIN   GPIO_PIN_13  

#define SCL_Port    GPIOB
#define SDA_Port    GPIOB

#define SCL(x)    ((x) ? (HAL_GPIO_WritePin(SCL_Port, SCL_PIN,  GPIO_PIN_SET))  : (HAL_GPIO_WritePin(SCL_Port,  SCL_PIN,  GPIO_PIN_RESET)))
#define SDA(x)    ((x) ? (HAL_GPIO_WritePin(SDA_Port, SDA_PIN,  GPIO_PIN_SET))  : (HAL_GPIO_WritePin(SDA_Port,  SDA_PIN,  GPIO_PIN_RESET)))

int8_t soft_iic_init(void);
int8_t soft_iic_deinit(void);
int8_t soft_iic_write_bytes(uint8_t *data, 
                            uint32_t len);
int8_t soft_iic_read_bytes(uint8_t *data,
						   uint32_t len);	
int8_t soft_iic_write_register_bytes(uint8_t register_addr,
									 uint8_t *data, 
									 uint32_t len);
int8_t soft_iic_read_register_bytes(uint8_t register_addr, 
									uint8_t *data, 
									uint32_t len);
